From: Florian Müllner Date: Mon, 27 Sep 2021 13:40:05 +0000 (+0200) Subject: notificationDaemon: Fix sound-file support X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~557^2^2~30 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4d1ce0de41b61ba4ed3b6747095e23d6203f6da5;p=gnome-shell.git notificationDaemon: Fix sound-file support When commit 25bfe99ed53b5b7 replaced the thin libcanberra wrapper with the (then) new MetaSoundPlayer API, it missed that the latter expects files as GFile instead of a file path. Part-of: --- diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index 69137b1b2..954ce8068 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -229,11 +229,16 @@ var FdoNotificationDaemon = class FdoNotificationDaemon { if (!gicon) gicon = this._fallbackIconForNotificationData(hints); - notification.update(summary, body, { gicon, - bannerMarkup: true, - clear: true, - soundFile: hints['sound-file'], - soundName: hints['sound-name'] }); + const soundFile = 'sound-file' in hints + ? Gio.File.new_for_path(hints['sound-file']) : null; + + notification.update(summary, body, { + gicon, + bannerMarkup: true, + clear: true, + soundFile, + soundName: hints['sound-name'], + }); let hasDefaultAction = false;